public class Body {

	// relevant variables of the object
	protected double mass;/*
						 * not private just in case we want to model a comet and
						 * we have to add a method in a subclass which modifies
						 * the mass
						 */
	private double[] position;
	private double[] velocity;
	private double[] acceleration;

	// constructor
	public Body(double initialMass, double[] initialPosition,
			double[] initialVelocity, double[] initialAcceleration) {
		mass = initialMass;

		position = new double[2];
		velocity = new double[2];
		acceleration = new double[2];

		for (int i = 0; i < 2; i++) {
			position[i] = initialPosition[i];
			velocity[i] = initialVelocity[i];
			acceleration[i] = initialAcceleration[i];
		}
	}

	public double getMass() {
		return mass;
	}

	public void setPosition(double[] newPosition) {
		position[0] = newPosition[0];
		position[1] = newPosition[1];
	}

	public double[] getPosition() {
		return position;
	}

	public void setVelocity(double[] newVelocity) {
		velocity[0] = newVelocity[0];
		velocity[1] = newVelocity[1];
	}

	public double[] getVelocity() {
		return velocity;
	}

	public void setAcceleration(double[] newAcceleration) {
		acceleration[0] = newAcceleration[0];
		acceleration[1] = newAcceleration[1];
	}

	public double[] getAcceleration() {
		return acceleration;
	}

}